3.921 \(\int \frac {(c-i c \tan (e+f x))^4}{(a+i a \tan (e+f x))^3} \, dx\)

Optimal. Leaf size=114 \[ \frac {6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac {i c^4 \log (\cos (e+f x))}{a^3 f}-\frac {c^4 x}{a^3}-\frac {6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac {8 i c^4}{3 f (a+i a \tan (e+f x))^3} \]

[Out]

-c^4*x/a^3-I*c^4*ln(cos(f*x+e))/a^3/f+8/3*I*c^4/f/(a+I*a*tan(f*x+e))^3-6*I*c^4/a/f/(a+I*a*tan(f*x+e))^2+6*I*c^
4/f/(a^3+I*a^3*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac {6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac {i c^4 \log (\cos (e+f x))}{a^3 f}-\frac {c^4 x}{a^3}-\frac {6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac {8 i c^4}{3 f (a+i a \tan (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Int[(c - I*c*Tan[e + f*x])^4/(a + I*a*Tan[e + f*x])^3,x]

[Out]

-((c^4*x)/a^3) - (I*c^4*Log[Cos[e + f*x]])/(a^3*f) + (((8*I)/3)*c^4)/(f*(a + I*a*Tan[e + f*x])^3) - ((6*I)*c^4
)/(a*f*(a + I*a*Tan[e + f*x])^2) + ((6*I)*c^4)/(f*(a^3 + I*a^3*Tan[e + f*x]))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rubi steps

\begin {align*} \int \frac {(c-i c \tan (e+f x))^4}{(a+i a \tan (e+f x))^3} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(a+i a \tan (e+f x))^7} \, dx\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \frac {(a-x)^3}{(a+x)^4} \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \left (\frac {1}{-a-x}+\frac {8 a^3}{(a+x)^4}-\frac {12 a^2}{(a+x)^3}+\frac {6 a}{(a+x)^2}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {c^4 x}{a^3}-\frac {i c^4 \log (\cos (e+f x))}{a^3 f}+\frac {8 i c^4}{3 f (a+i a \tan (e+f x))^3}-\frac {6 i c^4}{a f (a+i a \tan (e+f x))^2}+\frac {6 i c^4}{f \left (a^3+i a^3 \tan (e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.76, size = 121, normalized size = 1.06 \[ \frac {c^4 \sec ^3(e+f x) (-9 i \sin (e+f x)+6 f x \sin (3 (e+f x))+2 i \sin (3 (e+f x))-3 \cos (e+f x)+\cos (3 (e+f x)) (6 \log (\cos (e+f x))-6 i f x-2)+6 i \sin (3 (e+f x)) \log (\cos (e+f x)))}{6 a^3 f (\tan (e+f x)-i)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(c - I*c*Tan[e + f*x])^4/(a + I*a*Tan[e + f*x])^3,x]

[Out]

(c^4*Sec[e + f*x]^3*(-3*Cos[e + f*x] + Cos[3*(e + f*x)]*(-2 - (6*I)*f*x + 6*Log[Cos[e + f*x]]) - (9*I)*Sin[e +
 f*x] + (2*I)*Sin[3*(e + f*x)] + 6*f*x*Sin[3*(e + f*x)] + (6*I)*Log[Cos[e + f*x]]*Sin[3*(e + f*x)]))/(6*a^3*f*
(-I + Tan[e + f*x])^3)

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 93, normalized size = 0.82 \[ -\frac {{\left (12 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - 6 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )} + 3 i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, c^{4}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{6 \, a^{3} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))^4/(a+I*a*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/6*(12*c^4*f*x*e^(6*I*f*x + 6*I*e) + 6*I*c^4*e^(6*I*f*x + 6*I*e)*log(e^(2*I*f*x + 2*I*e) + 1) - 6*I*c^4*e^(4
*I*f*x + 4*I*e) + 3*I*c^4*e^(2*I*f*x + 2*I*e) - 2*I*c^4)*e^(-6*I*f*x - 6*I*e)/(a^3*f)

________________________________________________________________________________________

giac [A]  time = 2.40, size = 193, normalized size = 1.69 \[ -\frac {\frac {30 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{3}} - \frac {60 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a^{3}} + \frac {30 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a^{3}} + \frac {147 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 1002 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 2445 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3820 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 2445 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1002 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 147 i \, c^{4}}{a^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{6}}}{30 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))^4/(a+I*a*tan(f*x+e))^3,x, algorithm="giac")

[Out]

-1/30*(30*I*c^4*log(tan(1/2*f*x + 1/2*e) + 1)/a^3 - 60*I*c^4*log(tan(1/2*f*x + 1/2*e) - I)/a^3 + 30*I*c^4*log(
tan(1/2*f*x + 1/2*e) - 1)/a^3 + (147*I*c^4*tan(1/2*f*x + 1/2*e)^6 + 1002*c^4*tan(1/2*f*x + 1/2*e)^5 - 2445*I*c
^4*tan(1/2*f*x + 1/2*e)^4 - 3820*c^4*tan(1/2*f*x + 1/2*e)^3 + 2445*I*c^4*tan(1/2*f*x + 1/2*e)^2 + 1002*c^4*tan
(1/2*f*x + 1/2*e) - 147*I*c^4)/(a^3*(tan(1/2*f*x + 1/2*e) - I)^6))/f

________________________________________________________________________________________

maple [A]  time = 0.21, size = 91, normalized size = 0.80 \[ \frac {6 c^{4}}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )}+\frac {6 i c^{4}}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {i c^{4} \ln \left (\tan \left (f x +e \right )-i\right )}{f \,a^{3}}-\frac {8 c^{4}}{3 f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c-I*c*tan(f*x+e))^4/(a+I*a*tan(f*x+e))^3,x)

[Out]

6/f*c^4/a^3/(tan(f*x+e)-I)+6*I/f*c^4/a^3/(tan(f*x+e)-I)^2+I/f*c^4/a^3*ln(tan(f*x+e)-I)-8/3/f*c^4/a^3/(tan(f*x+
e)-I)^3

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))^4/(a+I*a*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 4.77, size = 103, normalized size = 0.90 \[ -\frac {\frac {6\,c^4\,\mathrm {tan}\left (e+f\,x\right )}{a^3}-\frac {c^4\,8{}\mathrm {i}}{3\,a^3}+\frac {c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2\,6{}\mathrm {i}}{a^3}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}+1\right )}+\frac {c^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{a^3\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c - c*tan(e + f*x)*1i)^4/(a + a*tan(e + f*x)*1i)^3,x)

[Out]

(c^4*log(tan(e + f*x) - 1i)*1i)/(a^3*f) - ((6*c^4*tan(e + f*x))/a^3 - (c^4*8i)/(3*a^3) + (c^4*tan(e + f*x)^2*6
i)/a^3)/(f*(tan(e + f*x)*3i - 3*tan(e + f*x)^2 - tan(e + f*x)^3*1i + 1))

________________________________________________________________________________________

sympy [A]  time = 0.65, size = 216, normalized size = 1.89 \[ \begin {cases} - \frac {\left (- 6 i a^{6} c^{4} f^{2} e^{10 i e} e^{- 2 i f x} + 3 i a^{6} c^{4} f^{2} e^{8 i e} e^{- 4 i f x} - 2 i a^{6} c^{4} f^{2} e^{6 i e} e^{- 6 i f x}\right ) e^{- 12 i e}}{6 a^{9} f^{3}} & \text {for}\: 6 a^{9} f^{3} e^{12 i e} \neq 0 \\x \left (\frac {2 c^{4}}{a^{3}} + \frac {\left (- 2 c^{4} e^{6 i e} + 2 c^{4} e^{4 i e} - 2 c^{4} e^{2 i e} + 2 c^{4}\right ) e^{- 6 i e}}{a^{3}}\right ) & \text {otherwise} \end {cases} - \frac {2 c^{4} x}{a^{3}} - \frac {i c^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{3} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c-I*c*tan(f*x+e))**4/(a+I*a*tan(f*x+e))**3,x)

[Out]

Piecewise((-(-6*I*a**6*c**4*f**2*exp(10*I*e)*exp(-2*I*f*x) + 3*I*a**6*c**4*f**2*exp(8*I*e)*exp(-4*I*f*x) - 2*I
*a**6*c**4*f**2*exp(6*I*e)*exp(-6*I*f*x))*exp(-12*I*e)/(6*a**9*f**3), Ne(6*a**9*f**3*exp(12*I*e), 0)), (x*(2*c
**4/a**3 + (-2*c**4*exp(6*I*e) + 2*c**4*exp(4*I*e) - 2*c**4*exp(2*I*e) + 2*c**4)*exp(-6*I*e)/a**3), True)) - 2
*c**4*x/a**3 - I*c**4*log(exp(2*I*f*x) + exp(-2*I*e))/(a**3*f)

________________________________________________________________________________________